Technical Field
The present invention relates to a memory management method, and more particularly, to a memory management method for a rewritable non-volatile memory module, a memory storage device and a memory control circuit unit.
Description of Related Art
The growth of digital cameras, mobile phones, and MP3 players has been rapid in recent years. Consequently, the consumers' demand for storage media has increased tremendously. In recent years, a rewritable non-volatile memory has become an import part of the electronic industries because the rewritable non-volatile memory is capable of providing features such as data non-volatility, low power consumption, small volume, non-mechanical structure and high read/write speed. For instance, a solid-state drive utilizing a flash memory as a storage media has been widely applied in a computer host as a main hard disk for enhancing access efficiency of computer.
In general, a memory storage device including the rewritable non-volatile memory module can release available physical erasing units by performing a garbage collection operation, and use physical erasing units in the rewritable non-volatile memory as evenly as possible in order to extend a lifetime of the rewritable non-volatile memory. For example, the traditional garbage collection operation selects one physical erasing unit having the least valid data from among the physical erasing units, and copies the valid data to another physical erasing unit in order to release the available physical erasing units. A traditional wear leveling operation refers to exchanging of the physical erasing units in a data area with the physical erasing units in a spare area each time after the rewritable non-volatile memory is operated over a fixed period of time or at a specific time-point, so that the physical erasing units having less erasing count in the data area may be exchanged to the spare area for programming (or writing) usage.
However, the traditional garbage collection procedure and the traditional wear leveling operation do not take in consideration of whether data stored in one specific physical erasing unit will be updated regularly. When the data stored in one specific physical erasing unit is updated regularly, even if the valid data stored by the specific physical erasing unit is moved to another physical erasing unit in the garbage collection operation, such valid data may be regarded as invalid right after being updated again. In other words, it is likely that the physical erasing unit stored with such valid data may be associated to the spare area again when the data is updated, such that the physical erasing unit originally stored with such valid data may be erased. Therefore, when next time the wear leveling operation is performed, since said physical erasing unit associated to the spare area again has the erasing count higher than other physical erasing units in the spare area, the chances of such physical erasing unit being exchanged to the data area again will be higher than other physical erasing units in the spare area. As such, this will cause the erasing counts of some physical erasing units in the rewritable non-volatile memory to be constantly increased, resulting in issues of uneven usage among the physical erasing units of the rewritable non-volatile memory.
Accordingly, it is one of the major subjects in the industry as how to avoid increases in frequency of performing the wear leveling operation caused by performing the garbage collection operation, and allow usage of each physical erasing unit to be more even in order to effectively extend the lifetime of the rewritable non-volatile memory.
Nothing herein should be construed as an admission of knowledge in the prior art of any portion of the present invention. Furthermore, citation or identification of any document in this application is not an admission that such document is available as prior art to the present invention, or that any reference forms a part of the common general knowledge in the art.